%cd C:\Documents and Settings\Administrator\Desktop\BCI

% 20110429 JR conditional inclusion of paths. Prevents long list of warnings  

%% basic BCI paths
tmp=path;

if isempty(strfind(tmp,['spider']))
    addpath([basePath filesep 'spider'])
    use_spider
end
if isempty(strfind(tmp,[basePath filesep 'toolbox\chronux_2_0']))
    addpath(genpath([basePath filesep 'toolbox\chronux_2_0']));
end
if isempty(strfind(tmp,[basePath filesep 'toolbox\fieldtrip-20100131']))
    addpath(genpath([basePath filesep 'toolbox\fieldtrip-20100131']));
end
if isempty(strfind(tmp,[basePath filesep 'toolbox\MD_classifier']))
    addpath([basePath filesep 'toolbox\MD_classifier']);
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts']))
    addpath(genpath([basePath filesep 'bciScripts']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'classifiers']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'classifiers']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'datatransfer']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'datatransfer']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'featselect']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'featselect']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'paradigms']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'paradigms']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'processing']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'processing']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'utilities']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'utilities']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'utilities' filesep 'mappingTool']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'utilities' filesep 'mappingTool']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'validate']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'validate']));
end
if isempty(strfind(tmp,[basePath filesep 'bciScripts' filesep 'visualize']))
    addpath(genpath([basePath filesep 'bciScripts'  filesep 'visualize']));
end
if isempty(strfind(tmp,[basePath filesep 'utilities' filesep 'signalGenerator']))
    addpath(genpath([basePath filesep 'utilities' filesep 'signalGenerator']));
end


%% paths for virtual arm  
if isempty(strfind(tmp,[basePath filesep 'virtualArm']))
    addpath([basePath filesep 'virtualArm'])
end

